package com.coo.tao.web.controller.example;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.coo.tao.services.example.po.Example;
import com.coo.tao.services.example.service.IExampleService;
import com.coo.tao.web.controller.base.BaseController;
@Controller
@RequestMapping(value="/example")
public class ExampleController extends BaseController {
	@Resource
	private IExampleService exampleService;
	@RequestMapping(value="/query/{id}",method = RequestMethod.GET)
	public ModelAndView queryExampleListById(@PathVariable("id") Integer id){
		ModelAndView mv = new ModelAndView();
		List<Example> list = exampleService.queryExampleList(id);
		mv.addObject(list);
		return mv;
	}
}
